package com.company.entity;

public class ReponseResult {

    public static final Integer SUCCESS=0;
    public static final Integer FAIL=1;
    private Integer code;
    private String msg;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public ReponseResult(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static ReponseResult success(String msg)
    {
        return new ReponseResult(SUCCESS,msg);
    }

    public static ReponseResult fail(String msg)
    {
        return new ReponseResult(FAIL,msg);
    }
}
